Re: Programatically create, dump, copy to other serverand restore database
am 21.06.2010 21:39:26 von dimitar nen4ev------=_Part_26750_321590059.1277149166993
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Hi
Thanks for you reply.
I change it, because taking the fakt that every server will have slave re=
plication(as fail over) i decided only to use it. i.e.=20
I have serve A with database test, and server B is replication database t=
est.
So when i need to partition(meaning to separate 1/2 of the database on ot=
her server) in A i simply delete the unwanting records. And on server B i=
delete the unwanting records(which are the wanting on B) And again setup=
a relication servers for A and B.
-------- ÐÑигинално =D0=
¿Ð¸ÑмÐ=BE --------
ÐÑ: Dai, Tino tdai@loc.gov
ÐÑноÑно: RE: [ADMIN] Programatically c=
reate, dump, copy to other server and
restore database
Ðо: dimitarn ,
pgsql-admin@postgresql.org=20
=20
ÐзпÑаÑено на: Ð=
онеделник, 2010, Юн=
и 21 22:25:46 EEST
You might be able to do that will slony (haven't tried) and you might be =
even be able to get away with a view=20
into the data depending on your requirements. -Tino
________________________________________
From: pgsql-admin-owner@postgresql.org [pgsql-admin-owner@postgresql.or=
g] On Behalf Of dimitarn [dimitarn@abv.bg]
Sent: Sunday, June 20, 2010 12:12 PM
To: pgsql-admin@postgresql.org=20
Subject: [ADMIN] Programatically create, dump, copy to other server and r=
estore database
Hi
I have a database running on server A. I need to have my custom web
interface from which i partition/replicate part of the data to other serv=
er.
Example:
Server A there is table with records from 1 to 100k.
Create the same database on the other server, partition this table on oth=
er
server taking the records from 50k to 100k and replicate the all data fro=
m
the other tables. Also all users, roles, indexes and so on on server B.
So my thoughts are to execute some how the dump script, then copy it to
server B, execute the create database and tables scripts, drop the index=
es
on the partitioned table, (remove the records 1 to 50k from the dump file
or) execute the script and remove the records from 1 to 50k, add the
indexes.
OR
Copy the postgres data files(i don't know how they are organized in
postgres, but in mysql there are data nad index files) to the data file
directory on server B. I think this will immediately make the database
visible and working to postgres db server? And then remove the records fr=
om
1 to 50k.
If you have any other suggestions please share them :)
--
View this message in context: http://old.nabble.com/Programatically-crea=
te%2C-dump%2C-copy-to-other-server-and-restore-database-tp28 941026p289410=
26.html=20
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin=20
=20
------------------------------------------------------------ ---=
--
453__zoneid=3D63__oadest=3Dhttp://sportni.bg/worldcup2010/?t id=3D20&oid=3D=
1004" target=3D"_blank">
ÐÑогÑама за Ñв=
еÑовноÑо пÑÑв=
енÑÑво по ÑÑÑб=
ол в ЮÐÐ 2010. Ðиж Т=D0=
£Ð=9A!
------=_Part_26750_321590059.1277149166993
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Hi
Thanks for you reply.
I change it, because taking the fakt that ev=
ery server will have slave replication(as fail over) i decided only to use =
it. i.e.
I have serve A with database test, and server B is replication=
database test.
So when i need to partition(meaning to separate 1/2 of t=
he database on other server) in A i simply delete the unwanting records. An=
d on server B i delete the unwanting records(which are the wanting on B) An=
d again setup a relication servers for A and B.
-------- ÐÑигинално =D0=
¿Ð¸ÑмÐ=BE --------
ÐÑ: Dai, Tino tdai@loc.gov
ÐÑноÑно: RE: [ADMIN] Programatically=
create, dump, copy to other server and
restore database
Ðо: dimitarn
pgsql-admin@postgresql.org=20
=09
ÐзпÑаÑено на: =
Ðонеделник , 2010, Ю=
ни 21 22:25:46 EEST
You might be able to do that will slony (haven't tried) and you mig=
ht be even be able to get away with a view
into the data depending on your requirements. -Tino
________________________________________
From: rg')">pgsql-admin-owner@postgresql.org [pgsql-admin-owner@postgresql.or=
g] On Behalf Of dimitarn [dimitarn@abv.bg]
Sent: Sunday, June 20, 2010 12:12 PM
To: pg=
sql-admin@postgresql.org
Subject: [ADMIN] Programatically create, dump, copy to other server and res=
tore database
Hi
I have a database running on server A. I need to have my custom web
interface from which i partition/replicate part of the data to other server=
..
Example:
Server A there is table with records from 1 to 100k.
Create the same database on the other server, partition this table on other=
server taking the records from 50k to 100k and replicate the all data from<=
br>
the other tables. Also all users, roles, indexes and so on on server B.
So my thoughts are to execute some how the dump script, then copy it to
>
server B, execute the create database and tables scripts, drop the indexes=
on the partitioned table, (remove the records 1 to 50k from the dump file r>
or) execute the script and remove the records from 1 to 50k, add the
indexes.
OR
Copy the postgres data files(i don't know how they are organized in
postgres, but in mysql there are data nad index files) to the data file
directory on server B. I think this will immediately make the database
visible and working to postgres db server? And then remove the records from=
1 to 50k.
If you have any other suggestions please share them :)
--
View this message in context: lly-create%2C-dump%2C-copy-to-other-server-and-restore-datab ase-tp28941026p=
28941026.html" target=3D"_blank">http://old.nabble.com/Programatically-crea =
te%2C-dump%2C-copy-to-other-server-and-restore-database-tp28 941026p28941026=
..html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
">http://www.postgresql.org/mailpref/pgsql-admin
------------------------------------------------------------ -----=
3__zoneid=3D63__oadest=3Dhttp://sportni.bg/worldcup2010/?tid =3D20&oid=3D100=
4" target=3D"_blank">
ÐÑогÑама за Ñв=
еÑовноÑо пÑÑв=
енÑÑво по ÑÑÑб=
ол в ЮÐÐ 2010. Ðиж Т=D0=
£Ð=9A!
------=_Part_26750_321590059.1277149166993--